'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = 'hi, egg';
  }
  async getList() {
    let listData = await this.app.mysql.query('select * from blogs');
    console.log(listData, 'listdata')
    this.ctx.body = listData;
  }
}

module.exports = HomeController;
